<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>text.html</title>
<script>

	window.onload=function(){
		var btn=document.getElementById('btnCopy');
		btn.onclick=function(){
			var o=frm.ori;
			var t=frm.target;
			
			t.value=o.value;
			
		}
			
	}

</script>
</head>
<body>
<h1> Text 입력상자의 값 제어 </h1>
<form name='frm' action='' method='post'>
원본:<input type='search' name='ori' value='park'>
<br/>
사본:<input type='search' name='target'>
<p/>
<input type='button' value='복사' id='btnCopy'>

</form>

</body>
</html>